# -*- coding: UTF-8 -*-  
from django.forms import ModelForm  
from .models import *  
from django import forms
  
class deviceForm(ModelForm):  
	class Meta:  
		model = device
		exclude = ['device_signtime']  
		fields = "__all__"
  
class serviceForm(ModelForm):  
	class Meta:  
		model = service
		fields = "__all__"
  
class TaskForm(forms.Form):  
    #任务类型的分类  
	category = (  
		(U'业务上线','业务上线'),  
		(U'业务下线','业务下线'),  
		(U'日常维护','日常维护'),  
	)  
	task_title = forms.CharField(label = '任务名称',max_length = 255)  
	task_category = forms.ChoiceField(label='任务分类',choices= category)  
	#建立联系人，其中的textarea做了规格设定，默认行高为2  
	task_contacts = forms.CharField(label = '联系人',widget=forms.Textarea(attrs={'rows': '2'}),required=False)  
	#建立一个复选框的实施人员，通过queryset来获取人员列表  
	task_member = forms.ModelMultipleChoiceField(label='负责人员',  
                                                 queryset=Employee.objects.all(),  
                                                 widget=forms.CheckboxSelectMultiple)  
	#建立一个处理过程  
	process_content = forms.CharField(label = '处理过程',widget=forms.Textarea)
